//
//  LYDetailViewController.swift
//  微博
//
//  Created by liuerying on 16/5/20.
//  Copyright © 2016年 liuerying. All rights reserved.
//

import UIKit

class LYDetailViewController: UIViewController {

    override func viewDidLoad() {
        //设置一下标题栏的title,调试用
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"
        
        view.backgroundColor = UIColor.lightGrayColor()
        
//        let back = UIBarButtonItem(imageName: "navigationbar_back_withtext", title:"返回", target: self, action: #selector(LYDetailViewController.back))
//        
//        navigationItem.leftBarButtonItem = back
        
        //进入多级页面
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "next", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(LYDetailViewController.next))
        
          }
    
//    
//    @objc private func back(){
//    
//        navigationController?.popViewControllerAnimated(true)
//        
//    }
    
    
    @objc private func next(){
        
        let detailView = LYDetailViewController()
        
        navigationController?.pushViewController(detailView, animated: true)
        
    }
   
}
